package com.aeon.app;

import static org.junit.Assert.*;

import java.util.Arrays;
import java.util.Collection;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

@RunWith(Parameterized.class)
public class ParameterizedRun {
	@Parameters
	public static Collection getParam() {
		return Arrays.asList(new Double[][] { { 5., 2., 3. }, { 7., 3., 4. } });
	}

	double mExpected;
	double mA;
	double mB;

	public ParameterizedRun(double e, double a, double b) {
		mExpected = e;
		mA = a;
		mB = b;
	}

	@Test
	public void testAdd() {
		Calculator calculator = new Calculator();
		assertEquals(mExpected, calculator.add(mA, mB), 0);
	}

}
